Jump to content

what is wrong?


Kyle

Recommended Posts

  • Moderators

Ok, i'm trying to make a add on and i am making it only accessable for pilots but when i was logged in, i all got the red bar and my .Tpl is in the templates folder.

What is wrong with this code?

<?php

class flightops extends CodonModule
{

       public function index()
       {
		if(!Auth::LoggedIn())

		$this->set('message', 'You must be logged in to access this feature!');
		$this->render('core_error.tpl');
		return;

       Template::Show('flightops.tpl');

       }
}
?>

Any help would be awsome ;)

Link to comment
Share on other sites

Guest lorathon

Try this

You need to put what you want done if the IF is true in brackets since it is more than one command.

<?php

class flightops extends CodonModule
{

       public function index()
       {
                       if(!Auth::LoggedIn())
                       {
                       $this->set('message', 'You must be logged in to access this feature!');
                       $this->render('core_error.tpl');
                       return;
                       }    

       Template::Show('flightops.tpl');

       }
}
?>

Link to comment
Share on other sites

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