Klikoka Posted February 14, 2008 Posted February 14, 2008 This Is In Reply To The Request In This Topic::: Lock Down First Make A File Called lockdown.php: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then In login.php Find:: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace With:: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then Find:: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace With:: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then When You Have Finished Editing The Game Just Find What Was Changed On This Topic And Change It Back :-D Quote
Ghetto Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] or simply put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Under: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then just remove it when you want to open the game. And the problem with your code is that the 'admins' wont be able to login eather. Also its including globals witch wont work if not loggin. Quote
Haunted Dawg Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] lame! just run this sql: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add in header: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now add this file (Name it staff_lock.php) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It has not been tested so please post bugs... Quote
Isomerizer Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] Kyle, all that extra code and column in users isnt required, I'm going with Ghetto.. Just add the admin IP so it can allow the admin to have access, use || for various ips... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. or simply put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Under: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then just remove it when you want to open the game. And the problem with your code is that the 'admins' wont be able to login eather. Also its including globals witch wont work if not loggin. Quote
Haunted Dawg Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] i just had it on my ptc that i can lock down website and allow multis or not and i just used: $myip = "{ my ip here }"; if($ip != $myip) { die('Site currently locked.'); //Kill script if your ip aint above in my ip. } else if($ip == $myip) { echo 'Site currently locked.'; //Allert the allowed ip that the site is locked. } Quote
jeeppimp Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] lame! just run this sql: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This all is somewhat confusing to me. I'm new at this, what would you mean by that when you say just run this sql:? do you place this line somewhere or run it in phpMyAdmin? thanks for all of the help guys! Quote
Ghetto Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] Thats pointless and a waist of space. Just use mine ot Iso's code. Quote
jeeppimp Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] ****BAM**** that did did it!! thanks!! Quote
Haunted Dawg Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] Ghetto your code is pretty lame this user will need to enter the header.php, register.php, login.php each time just to go lock down the game there for my script you do it through your panel and it does it automaticly just because yours is using some thing like: $regon=TRUE; each time the owner will need to enter the cpanel to go change TRUE to FALSE so it will work like this $regon=TRUE; //IF FALSE: game open IF TRUE: game closed if($regon == TRUE) { echo 'game closed...'; exit; } now just to put the game online again he has to go edit every single code to: $regon=FALSE; //IF FALSE: game open IF TRUE: game closed if($regon == TRUE) { echo 'game closed...'; exit; } now as for jeeppimp he said he is new at php codes now it will be easier for him to just click that button and just put yes to turn it off or yes to turn it on and viola only he can see the game now so basicly your code will work 100% but it takes more time because: 1.- change domain url to www.yourdomainname.com/cpanel 2.- enter details to login to cpanel 3.- go to file manager 4.- find the file 5.- click on edit file 6.- edit the file to FALSE to just open the game 7.- save it 8.- all players can play. Basicly step by step youll take 8 steps now on my one all you do is: 1.- Go to staff menu 2.- look for the lock down button 3.- read the text above and hit the submit button 4.- if($turn == on) { echo 'Viola everyone can now play the game.'; } as you can see what you take is 8 steps compared to 4 wich a newb would prefer 4 steps and easier steps. just my point of view. Quote
Haunted Dawg Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] Here is the place so u can click the button lol forgot about it: > Lock Game Quote
jeeppimp Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] Ok man! lol! thanks :lol: Quote
jeeppimp Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] I did get this Parse error.. Parse error: syntax error, unexpected '<' in /home/*******/public_html/staff_lock.php on line 15 line 15.... <select name="noyes"> is there supposed to be a separation? no and yes. Quote
Haunted Dawg Posted February 14, 2008 Posted February 14, 2008 Re: [V2]Lock Down[V2] use this code: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
zbirc3 Posted February 15, 2008 Posted February 15, 2008 Re: [V2]Lock Down[V2] Damn, I wish +1 was still here. Nice Mod. Quote
Godhand Posted February 15, 2008 Posted February 15, 2008 Re: [V2]Lock Down[V2] theres a better way to use a table for it. For example why not just make a setting and do a check for it. and if that check is happening it makes the page not work if they're user level equals 1. :-o Was that just a little more efficient? shame on me.... Quote
AlabamaHit Posted February 23, 2008 Posted February 23, 2008 Re: [V2]Lock Down[V2] Shouldn't there be something in there so everyone on the game cant see the staff_lockdown.php...and Im not sure just curious shouldnt it include "sglobals.php" not the globals.php....Please dont attack me to hard just curious on this not saying your wrong :mrgreen: yeah i think its inlcude "sglobals.php" not globals.php and i would put at the top of page something like if($ir['userid'] != 1) { print "This is for the Owner only > Back"; $h->endpage; exit; Quote
Vyp3r2oo9 Posted February 29, 2008 Posted February 29, 2008 Re: [V2]Lock Down[V2] My "5-Easy-Steps" Lockdown :wink:. 1. Buy real hosting that has a cPanel. 2. Click "Password Protect Directorys". 3. Click public_html or the directory you want to password. 4. Tick the box saying "Password protect this directory", type something in the "Name the protected directory" box. 5. Create a user and remember the username and password. There! That just saved you about 5 minutes of putting a mod on that you're most likely never going to use now you have seen this ;D But it could be good if you dont have time to logon to the cPanel (Although I'm always on my cPanel 8-)) Advantages : If you have helpers you can create a username for them too. This protects all of your files in the directory. NOTE: The owner isn't always ID: 1 - If they dont know how to install a game they might get their coder to do it Quote
Godhand Posted March 1, 2008 Posted March 1, 2008 Re: [V2]Lock Down[V2] I will say a setting would be much better though. Although truly it would make your game more secure that way just mentioned. Quote
TheBigChief Posted March 19, 2009 Posted March 19, 2009 Re: [V2]Lock Down[V2] Just for fun I like to bring old posts back to life...... :-D But seriously, I tried the method HDawg advised and it won't update the DB to set locked to 1. Any ideas? Quote
TheMafia! Posted March 19, 2009 Posted March 19, 2009 Re: [V2]Lock Down[V2] how about just removing the register.php page just put it back up when you open the game Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.