Jump to content

Recommended Posts

Posted

if($pilot == inactive)

{

//Show this badge

}

else

{

//Show this badge

}

}

if($pilot == inactive)
{
//Show this badge
}
else
{
//Show this badge
}

took out the extra }

i have it in my site, it works, but only for the bottom pilot of each table. How could i fix this?

Cheers

Dan C

Posted

<?php
 if($pilot == inactive)
{
	echo '<img src="'.SITE_URL.'/lib/skins/cargo/images/inactive.png" width="150" height="58" alt="inactive">';
}


 else
{
	echo '<img src="'.SITE_URL.'/lib/skins/cargo/images/active.png" width="150" height="58" alt="active">';
}
?>

That is the code i used, should be fine, as it shows the active, but only at the bottom of each hubs roster.

Cheers

Dan C

Posted (edited)

if($pilot->retired == 1)
{
// theyre inactive
}
else
{
// theyre active
}

for some reason I found that nabeel's code got it wrong, and my active pilots were shown to be inactive when they were active. I have put the fix up. But you can try both ways and see what works for you.

Cheers

Dan C

Edited by nightfox
Guest Brian
Posted

@Nabeel lol, Im slowing learning Object Oriented. Im still and oldschool guy :D.

Posted

Thanks to all for their input. I think I've got the gist of it. After thinking it through, I realize it is probably a bad idea. After all, who wants the world to know how many pilots are there in name only.rolleyes.gif

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