Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

fallback and checkrights ..?

Asked Modified Viewed 2,616 times
L
Liliplanet
L
  • Member, joined since
  • Contributed 89 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
asked
Member

(sorry for the double posting)

Please, so confused here .

I'm trying for iGUEST and iMEMBER not to be allowed to access certain pages, but iPREMIUM and iPLATINUM can.

when I use the following:

if((iGUEST || iMEMBER)) fallback("premium.php";

nobody, not even iPREMIUM and iPLATINUM cannot get through either.

in the case of:

if((iMEMBER)) fallback("premium.php"; lets through iGUEST to access the page.

Did an extensive search and there also seems the solution of checkrights which I don't quite understand:

if (!checkrights("M" || !checkgroup("3" fallback("premium.php";

What is "M" and what is checkgroup?

Appreciate any reply, thank you so much!

Lilian
0 replies

7 posts

L
Liliplanet
L
  • Member, joined since
  • Contributed 89 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

I think I figured it out:

if (checkgroup(7)){
}
else {
redirect('premium.php');
}

works fabulous!

Have a great evening.
Lilian
0 replies
D
DwB
D
DwB 10
  • Junior Member, joined since
  • Contributed 21 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

If I'm not wrong its because every iPREMIUM is also an iMEMBER. It must be the same with iMEMBER and iADMIN / iSUPERADMIN. Every admin / superadmin is also a member.
Therefore a if-case like

if(!iPREMIUM || iPLATINUM) do redirect/fallback to certain site for members/guests
0 replies
L
Liliplanet
L
  • Member, joined since
  • Contributed 89 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

a huge step ahead for my site, but just a little advice please ...

I would like 2 checkgroups to access a page:

<center><?if (checkgroup(157) || (checkgroup(158)){
require_once "classifieds_panel.php";?>
<br><center><?
} else {
openside("Contact Details");
echo " <br><center>You need to <a href='http://www.filmmaker.co.za/'> LOGIN</a> or <a href='http://www.filmmaker.co.za/register.php'> UPGRADE TO PREMIUM MEMBERSHIP</a> to access the contact details.<a href='register.php'><br><BR><BR>";
closeside();
}
?></center>


which gives an error: unexpected '{'

I've also tried:

<?if (checkgroup(157,158)){
require_once "classifieds_panel.php";?>
<br><center><?
} else {
openside("Contact Details");
echo " <br><center>You need to <a href='http://www.filmmaker.co.za/'> LOGIN</a> or <a href='http://www.filmmaker.co.za/register.php'> UPGRADE TO PREMIUM MEMBERSHIP</a> to access the contact details.<a href='register.php'><br><BR><BR>";
closeside();
}
?>


to no avail.

How do I checkgroups for 2 groups please?

Look forward to any reply.

Have a great day!
Lilian
0 replies
F
fetloser
F
  • Senior Member, joined since
  • Contributed 275 posts on the community forums.
  • Started 2 threads in the forums
answered
Senior Member

Quote

Liliplanet wrote:
I think I figured it out:

if (checkgroup(7)){

}else {
redirect('premium.php');
}

works fabulous!

Have a great evening.
Lilian


if (!checkgroup(7)) redirect('premium.php');

This does the same but with less code.
Of course, if your goal was to check more groups your first solution is better since mine would fail. But for one group only mine is better codwise.
0 replies
L
Liliplanet
L
  • Member, joined since
  • Contributed 89 posts on the community forums.
  • Started 26 threads in the forums
  • Started this discussions
answered
Member

thank you Fetloser for your reply!

how would I check for 2 groups (or more than 1) please ..

Have a great afternoon.
Lilian
0 replies
F
fetloser
F
  • Senior Member, joined since
  • Contributed 275 posts on the community forums.
  • Started 2 threads in the forums
answered
Senior Member

Make a file in your fusion root. Put this in it

<?php
/*---------------------------------------------------+
| PHPFusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2006 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

if (checkgroup(1) || checkgroup(2)){
echo"Your in one of these :)";
}else {
echo"you faild booth checks";
}
require_once "side_right.php";
require_once "footer.php";
?>


then look at it in your browser with a user in one of the groups and then one that is not in a group. Easier to see the logic then :)
Edited by fetloser on 27-01-2007 17:00,
0 replies
— 1 year later —
Y
yo_nu_tz_18
Y
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
answered
Newbie

Hello ... I am having 2 problems with infuzion classifieds_panel

1. Let me say one thousand and how someone can I do about those categories more than 2 columns and no longer defend subcategories below category

2. Not to give me always accept every announcement added visitors
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet