PDA

View Full Version : Extra Options for ROOT Admins


Ashje
07-10-2009, 06:44 PM
On the accounts page I want ROOT Admins to have a link that gives them access to the admin.php page. I have this:

if($usersgroup == 1) and ($act == ""){

// Group 1, Root Admins

$article_title = $loggedinname."'s Account";
$article_content = $lang_account_manage."<br><br>
<b><u>Account Settings:</u></b><br><br>
<a href='myadopts.php'>Manage Adoptables</a><br>
<a href='profile.php?user=".$loggedinname."'>View Profile</a><br>
<a href='account.php?act=changeemail'>Change Email Address</a><br>
<a href='account.php?act=changepass'>Change Password</a><br>
<a href='account.php?act=changesettings'>Change Settings and Profile Info</a><br>
<a href='admin.php'>Go to the ACP</a>";
}
else if($act == ""){

// No action specified

$article_title = $loggedinname."'s Account";
$article_content = $lang_account_manage."<br><br>
<b><u>Account Settings:</u></b><br><br>
<a href='myadopts.php'>Manage Adoptables</a><br>
<a href='profile.php?user=".$loggedinname."'>View Profile</a><br>
<a href='account.php?act=changeemail'>Change Email Address</a><br>
<a href='account.php?act=changepass'>Change Password</a><br>
<a href='account.php?act=changesettings'>Change Settings and Profile Info</a>";

}


But it's giving me a:


Parse error: syntax error, unexpected T_LOGICAL_AND in /home/------/public_html/account.php on line 77



Can someone help me with this please?

aroymart
07-10-2009, 07:27 PM
the error is in the file account.php which we cant see (unless thats just a part of it)

can you either show us all of account.php or line 77 76 and 78?

Ashje
07-11-2009, 05:59 PM
-_-"
The error is the "and" here:

if($usersgroup == 1) and ($act == ""){

I know that myself. I just want to know what I can change that to which will have the same effect but without the error.

Seapyramid
07-11-2009, 10:07 PM
use


if($usersgroup == 1 && $act == ""){



Sea :)

aroymart
07-11-2009, 10:40 PM
lol sorry i did not notice that, i was going to try to count the lines

Ashje
07-12-2009, 04:02 AM
use


if($usersgroup == 1 && $act == ""){



Sea :)


Thank you. XD


lol sorry i did not notice that, i was going to try to count the lines


Never mind. ^-^

Bloodrun
07-14-2009, 09:40 AM
I put mine in my Sidebar function, that way it will be accesible anywhere on the site.
I also put one in the Footer, but thats there for my forum =/

Which reminds, my next forum update will be MUCH, MUCH bigger then the currently released edition.
Thus, the Premium Member Forum that is out right now, will be released to the Non Premium Members. But currently I am not working on the coding, as I need to focus my thoughts to school, which is almost, kinda over =/

Ashje
07-14-2009, 10:44 PM
Cool. Good Luck XD