2 Questions

Brackston

Member
Aug 6, 2014
232
20
1. How can I make it so admins can access the hotel while maintenance mode is on. In class.core, I tried changing
Code:
elseif($_GET['url'] != 'maintenance')
to
Code:
elseif($_GET['url'] != 'maintenance' && $_SESSION['user']['rank'] != 7)
But it just messed the whole cms up, couldnt access anything. Also this is for rev
____________________________________________________________________________________________
2. When I try editing an image in my habbo.swf, theres no transparency. The new image has transparency, but it doesnt show in the swf. How can I do this?
Thanks.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
elseif($_GET['url'] != 'maintenance')
Lets break this down. This says that it gets the URL so for example devbest.com and then it checks to see if it is "maintenance" so it is pretty much saying this:
if(devbest.com/maintenance NOT EQUAL maintenance then do this...
and you change it to:
elseif($_GET['url'] != 'maintenance' && $_SESSION['user']['rank'] != 7)
If devbest.com/maintenance NOT EQUAL maintenance - So this means that the maintenance is off
AND
$_SESSION['user']['rank'] I am not sure this works. I tried this on my RevCMS version and it doesn't so I would try to create a new variable and do something like;
$GetMe = mysql_query("SELECT * from USERS where id=$_SESSION['user']['id']);
then put in the if statement
&& !($GetMe['Rank'] >= 7) - Not Greater Than Equal To 7
 

Brackston

Member
Aug 6, 2014
232
20
elseif($_GET['url'] != 'maintenance')
Lets break this down. This says that it gets the URL so for example devbest.com and then it checks to see if it is "maintenance" so it is pretty much saying this:
if(devbest.com/maintenance NOT EQUAL maintenance then do this...
and you change it to:
elseif($_GET['url'] != 'maintenance' && $_SESSION['user']['rank'] != 7)
If devbest.com/maintenance NOT EQUAL maintenance - So this means that the maintenance is off
AND
$_SESSION['user']['rank'] I am not sure this works. I tried this on my RevCMS version and it doesn't so I would try to create a new variable and do something like;
$GetMe = mysql_query("SELECT * from USERS where id=$_SESSION['user']['id']);
then put in the if statement
&& !($GetMe['Rank'] >= 7) - Not Greater Than Equal To 7
Okay so what do I need to change? and to what.
Also, any idea on the second question?
 

Janzeer

Headmaster Of Hogwart's
Apr 30, 2012
522
47
1. How can I make it so admins can access the hotel while maintenance mode is on. In class.core, I tried changing
Code:
elseif($_GET['url'] != 'maintenance')
to
Code:
elseif($_GET['url'] != 'maintenance' && $_SESSION['user']['rank'] != 7)
But it just messed the whole cms up, couldnt access anything. Also this is for rev
____________________________________________________________________________________________
2. When I try editing an image in my habbo.swf, theres no transparency. The new image has transparency, but it doesnt show in the swf. How can I do this?
Thanks.
Place this at the very top of your me page
PHP:
<?php if($_SESSION['user']['rank'] >= 7){ ?>
then place this at the very bottom
PHP:
<?php } else{header('Location: http://www.domain.com/maintenance');} ?>
and also remove the checkmaintenance.php or something on the index's page.
 

JayC

Well-Known Member
Aug 8, 2013
5,505
1,401
make a maint database, create ur acc there. close registration (or put login bar on ur maint page) and done,
Lol why would you create a whole new database table, risking your account in another table, when you could just create a column in your users table called "bypass_main"
 

Janzeer

Headmaster Of Hogwart's
Apr 30, 2012
522
47
Lol why would you create a whole new database table, risking your account in another table, when you could just create a column in your users table called "bypass_main"
I would agree on this, he has to code on a mysql check on maintenance page and also disable maintenance check on index. Otherwise the code on top might be useful i guess.
 

Brackston

Member
Aug 6, 2014
232
20
Okay, I have something else need done too. Can anyone make a script on something for a chatbox on my hotel? So users can talk. I want it so they cant change their username on it as itll cause issues etc. Can it be about 400 px wide too? Sorry about it, Im picky :D Thanks.
 

Janzeer

Headmaster Of Hogwart's
Apr 30, 2012
522
47
Okay, I have something else need done too. Can anyone make a script on something for a chatbox on my hotel? So users can talk. I want it so they cant change their username on it as itll cause issues etc. Can it be about 400 px wide too? Sorry about it, Im picky :D Thanks.
Don't bump a thread, create a new one. But well you can search for one and resize and edit it to make it as what you want.
 

Users who are viewing this thread

Top