Jump to content

Interface dependant upon pilot's group


Recommended Posts

Posted

Hey all,

I'm attempting to have a logged in pilot's groupid redirect to a specific skin. I've been fiddling with it for a while without success. Here's what I've come up with:

if(!Auth::LoggedIn())

{

if(PilotGroups::$groupid==2<a href="<?php echo url('/lib/skins/yaddayadda'); ?>)

Obviously it's not working quite the way I had anticipated. Any thoughts would be greatly appreciated.

Posted

Thanks.

CSS might work. Will give that a shot. I'm still not completely certain that it's not my coding skills (or lack thereof, to be truthful) that's the problem I'm running into. If you can get an idea of what I'm attempting to do from the example, is my coding even close to right or am I not properly syntaxing the query to get the logged in users pilotid along with that pilot's groupid (db groupid number 0,1,2,3 etc or even name "admin, moderator, etc)?

Posted

Have a look at this thread. You should be able to use this to change the skin of the pilot.

http://forum.phpvms.net/topic/3252-user-selectable-skins/

I'd read that previously - as part of the whole "look before you post" thing. :) I don't know that I can use that because I'm not really looking to have users choose their own skins, rather the login would recognize the usergroup based on the login userid (similar to the code that checks if user is an admin and displays the admin link at top of the page if user is admin) but in this case, it would "move" the user to his group's skins folder (there are different functions in each skin folder for each group - not just the appearance of the pages.)But, I've stopped trying to do the group thing and concentrated more on userid/password like this:

<h1>Member Login</h1>

<form name="loginform" action="<?php echo url('/login');?>" method="post">

<?php echo "<?xml version='1.0'?>";

?>

<?php

if(isset($message))

echo '<p class="error">'.$message.'</p>';

?>

<?php

if(isset($_POST['submit'])){

if(($_POST['email'] == 'xyz123') && ($_POST['password'] == '098abc')) {

($_POST['redir'] = '/index.htm');

}

}

?>

I know this would mean adding code for each user (not a great big deal while I search for a better code). But the idea is to change the value of the redir depending on the user. I believe I have the principle about right, I think it's my syntax (all the specific {['"$;/ stuff) that I'm not getting right. Anyway, I'll keep playing around with it. Unlike some others (nameless)here, I will post my satisfactory results. After all, the "man" gave us all this stuff for free. Of all the code he's written for us, how crappy is it for us to come up with some "tidbit" of code inside all his massive amounts of coding and not share it as freely as he has? Ok... I've ranted. :)

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.   Restore formatting

  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.

Loading...
×
×
  • Create New...