Jump to content

Recommended Posts

Dear all hi i need help please guide me through this.

ok now the question is i have changed my virtual airline side menu last night and have installed some good menu here is the code

<?
print "</tr>";
print "<tr>";
print "<td width='190' height='100%' bgcolor='#B7CEC7' valign='top' style='border-right: 1px solid #004800'><br>";

?>
<?php
if ($logged=="yes"){
   print "<a href='logoff.php'><b>Logoff</b></a>";
}
else{
   print "<a href='logon.php'><b>Logon</b></a>";



}
?>
<div class="urbangreymenu">

<h3 class="headerbar">VPIA </h3>
<ul>
<br>
<img src="http://www.aircanadavirtual.com/images/simmiles.png" />
<img src="http://www.vpia.org/images/vatsim.png" />
<br>
<br>
<li><a href="http://www.simmiles.com/asiava/PIA/pilots.php">Simmiles Online Pilots</a></li>
<li><a href="http://www.simmiles.com/asiava/PIA/routes.php">Simmiles Online Routes</a></li>
<li><a href="http://www.simmiles.com/asiava/PIA/fleet.php">Simmiles Online Fleet</a></li>
<li><a href='about.php'>About us</a></li>
<li><a href='faq.php'>FAQ</a></li>
<li><a href='staff.php'>Staff</a></li>
<li><a href='photogallery.php'>Photo Gallery</a></li>
<li><a href='contact.php'>Contact</a></li>
<li><a href='disclaimer.php'>Disclaimer</a></li>
</ul>
</div>

now the thing is previously it was coded with some other coding in php and every thing is working properly now when i changed the side menu i dont know how to use php code with this menu basically i wanted to hide my pilot center from visitors and pilot i want pilot can only see pilot center after login with pilot IDS so i can i do that please help me out of this

here is my old menu code

<?
print "</tr>";
print "<tr>";
print "<td width='190' height='100%' bgcolor='#B7CEC7' valign='top' style='border-right: 1px solid #004800'><br>";

print "<table width='100' valign='top' border='0' cellpadding='5' cellspacing='0'>";

print "<tr>";
print "<td>";

if ($logged=="yes"){
   print "<a href='logoff.php'><b>Logoff</b></a>";
}
else{
   print "<a href='logon.php'><b>Logon</b></a>";



}

print "</td>";
print "<td></tr>";
print "<table width='100%'  valign='top' border='0' cellpadding='5' cellspacing='0'>";
print "<tr>";
print "<td width='7%' height='26' background='../images/menu_bg.gif'>";
print "<center><img src='../images/menu_arrow.gif'></center>";
print "</td>";

print "<td width='93%' height='26' background='../images/menu_bg.gif' class='menu'>";

print "VPIA <a href='main.php'><image src='/images/home.gif' border=0></a>";
print "</td>";
print "</tr>";


print "<tr>";
print "<td height='66' colspan='2'>";
print "<p>";

print "<a href='http://www.facebook.com/group.php?gid=4083514203'><image src='http://www.vpia.org/images/fcbk.jpg' border=0></a><br>";
print "<a href='skype:virtualpia?call'><img src='/images/skype1.jpg' style='border: none;' alt='Skype Me™!'/></a><br>";
print "<a href='http://www.twitter.com/VirtualPIA'><img src='http://twitter-badges.s3.amazonaws.com/follow_us-a.png' alt='Follow VirtualPIA on Twitter' width='150' height='25'</a><br>";
?>  
<br>

<img src="http://www.aircanadavirtual.com/images/simmiles.png" />
<img src="http://www.vpia.org/images/vatsim.png" />
<br><a href="http://www.simmiles.com/asiava/PIA/statistics.php"></a>
<br><a href="http://www.simmiles.com/asiava/PIA/pilots.php">Online Pilots</a>
<br><a href="http://www.simmiles.com/asiava/PIA/routes.php">Online Routes</a>
<br><a href="http://www.simmiles.com/asiava/PIA/fleet.php">Online Fleet</a>
<br>
<?
print "<a href='about.php'>About us</a> / <a href='faq.php'>FAQ</a><br>";
print "<a href='staff.php'>Staff</a><br>";
print "<a href='photogallery.php'>Photo Gallery</a><br>";
print "<a href='contact.php'>Contact</a><br>";

//print "<a href='http://vpia.free-forums.org' target='blanc'>Forum</a><br>";

print "<a href='disclaimer.php'>Disclaimer</a><br>";

//print "<a href='events.php'>Events</a><br>";
//print "<a href='news.php'>News</a><br>";
//print "<a href='links.php'>Links</a><br><br>";


if ($logged<>"yes"){
 print "<a href='registration.php'><b>JOIN VPIA</b></a><br>";
}
print "</td>";
print "</tr>";
print "</table>";
?>

hope someone can help me soon.

regards

Link to post
Share on other sites

Looks like you're using a custom system right? Yup,

<? if($logged<>"yes"){
// do things for logged in people
} ?>

Also, all those uses of print is messy.

Where you have multiple instances of print ""; to display html, you can just condense them all into a single print "";, or just remove print altogether and put php tags around the php.

Link to post
Share on other sites

Guys thank you so much for replying now the thing is Tom i am not using that Print Commands i have changed my menu that was old one what i am trying to ask you guys is this is my new menu

code

<div class="urbangreymenu">

<h3 class="headerbar">Pilot Center</h3>
<ul
<li><a href='ATR42.php'><b>ATR42 Schedules</a></li></b>

<li><a href='skedatr.php'><b>ATR42F Schedules</a></li></b>

<li><a href='b737.php'><b>B737 Schedules</a></li></b>

<li><a href='a310.php'><b>A310 Schedules</a></li></b>

<li><a href='b767.php'><b>A300 Schedules</a></li></b>

<li><a href='b777.php'><b>B777 Schedules</a></li></b>

<li><a href='b747.php'><b>B747 Schedules</a></li></b>

<li><a href='logbook.php'><b>My logbook</a></li></b>

<li><a href='download.php'><b>Download Section</a></li></b>

<li><a href='help.php'><b>Pilot's Manual</a></li></b>


<li><a href='rankings.php'><b>Rankings</a></li></b>

<li><a href='pilotroster.php'><b>Pilot hours</a></li></b>

<li><a href='flights.php?map=karachi' target='_blank'><b>Flight Movements</a></li></b>
</ul>
</div>

now juts tell me how i can hide only this pilot center menu and pilots can only see this menu after login example would be gr8 for me waiting for your reply asap.

Regards

Link to post
Share on other sites

Guys thank you so much for replying now the thing is Tom i am not using that Print Commands i have changed my menu that was old one what i am trying to ask you guys is this is my new menu

code

<div class="urbangreymenu">

<h3 class="headerbar">Pilot Center</h3>
<ul
<li><a href='ATR42.php'><b>ATR42 Schedules</a></li></b>

<li><a href='skedatr.php'><b>ATR42F Schedules</a></li></b>

<li><a href='b737.php'><b>B737 Schedules</a></li></b>

<li><a href='a310.php'><b>A310 Schedules</a></li></b>

<li><a href='b767.php'><b>A300 Schedules</a></li></b>

<li><a href='b777.php'><b>B777 Schedules</a></li></b>

<li><a href='b747.php'><b>B747 Schedules</a></li></b>

<li><a href='logbook.php'><b>My logbook</a></li></b>

<li><a href='download.php'><b>Download Section</a></li></b>

<li><a href='help.php'><b>Pilot's Manual</a></li></b>


<li><a href='rankings.php'><b>Rankings</a></li></b>

<li><a href='pilotroster.php'><b>Pilot hours</a></li></b>

<li><a href='flights.php?map=karachi' target='_blank'><b>Flight Movements</a></li></b>
</ul>
</div>

now juts tell me how i can hide only this pilot center menu and pilots can only see this menu after login example would be gr8 for me waiting for your reply asap.

Regards

Is this what you need?:

<?php

/*

Quick example of how to see if they're logged in or not

Only show this login form if they're logged in */

if(Auth::LoggedIn() == false)

{ ?>

SK

Link to post
Share on other sites

well when iam putting this code <?php

/*

Quick example of how to see if they're logged in or not

Only show this login form if they're logged in */

if(Auth::LoggedIn() == false)

{ ?>

it gives this error

59979138.png

and like this i am putting the code

<?php
/*
Quick example of how to see if they're logged in or not
Only show this login form if they're logged in */
if(Auth::LoggedIn() == false)

<div class="urbangreymenu">

<h3 class="headerbar">Pilot Center</h3>
<ul
<li><a href='ATR42.php'><b>ATR42 Schedules</a></li></b>

<li><a href='skedatr.php'><b>ATR42F Schedules</a></li></b>

<li><a href='b737.php'><b>B737 Schedules</a></li></b>

<li><a href='a310.php'><b>A310 Schedules</a></li></b>

<li><a href='b767.php'><b>A300 Schedules</a></li></b>

<li><a href='b777.php'><b>B777 Schedules</a></li></b>

<li><a href='b747.php'><b>B747 Schedules</a></li></b>

<li><a href='logbook.php'><b>My logbook</a></li></b>

<li><a href='download.php'><b>Download Section</a></li></b>

<li><a href='help.php'><b>Pilot's Manual</a></li></b>


<li><a href='rankings.php'><b>Rankings</a></li></b>

<li><a href='pilotroster.php'><b>Pilot hours</a></li></b>

<li><a href='flights.php?map=karachi' target='_blank'><b>Flight Movements</a></li></b>
</ul>
</div>
{ ?>

i really don't know how to put with in TAGS can you explain me with full code please

and let me explain you how i am using my menu now in my server i have one folder name Menu and inside it i have many PHPS files for different Menu section to show up with main.php and in other pages if i wnt to show my menu with the page i am putting php code on the top of the page like this

<? include("menu/m_item_general.php") ?>

i hope now you guys understand the process..........

Regards

Link to post
Share on other sites

You're not using phpvms so that code won't work. Use this:

<?
if($logged<>"yes"){ ?>

<div class="urbangreymenu">

<h3 class="headerbar">Pilot Center</h3>
<ul>
<li><a href='ATR42.php'><b>ATR42 Schedules</a></li></b>

<li><a href='skedatr.php'><b>ATR42F Schedules</a></li></b>

<li><a href='b737.php'><b>B737 Schedules</a></li></b>

<li><a href='a310.php'><b>A310 Schedules</a></li></b>

<li><a href='b767.php'><b>A300 Schedules</a></li></b>

<li><a href='b777.php'><b>B777 Schedules</a></li></b>

<li><a href='b747.php'><b>B747 Schedules</a></li></b>

<li><a href='logbook.php'><b>My logbook</a></li></b>

<li><a href='download.php'><b>Download Section</a></li></b>

<li><a href='help.php'><b>Pilot's Manual</a></li></b>


<li><a href='rankings.php'><b>Rankings</a></li></b>

<li><a href='pilotroster.php'><b>Pilot hours</a></li></b>

<li><a href='flights.php?map=karachi' target='_blank'><b>Flight Movements</a></li></b>
</ul>
</div>
} ?>

Link to post
Share on other sites
  • Administrators

Nobody knows About this CODE? :(

The little bit I can see looks like it is missing the opening php tag before line 87, you close the previous one at the top of the page.

<?php
   }
?>

Link to post
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...