Jump to content

Recommended Posts

Posted

Yeah, you're right. One topic solved, the next follows. Hope this will be the last one for a while ;).

We'll have a look at the schedule_results.tpl, where the problem is the following:

In front of every resulting flight I have put a picture (I mean the Aero Lloyd logo ; see below). I now intend to show this picture for every flight marked as passenger flight. For flights, marked as charter, I'd like to have another picutre. How do I handle with this "if"-issue to determine the appereance of each picture?!

probresults.PNG

I hope the problem is clear, otherwise just ask me.

Maybe there's someone in this holy programming-world, who can help me :). I'd really appreciate this, as I don't know what to do.

Kind regards from Germany

Bueno

Guest lorathon
Posted

try this. ( I am using $route hear from the schedules_results.tpl - You may need to change this)

<?php
if ($route->flighttype == "P")
{
 //Put code to show Pax image
}
else if($route->flighttype == "C")
{
 //Put code to show Cargo Image
}
else
{
 //put code for default or charter Image
}

Posted

Wow, many thanks for your fast answer. I thought of this kind of code, but it doesn't work at the moment.

I use the code like this:

<?php
if ($route->flighttype == "P")
{
 <img src="http://www.1234.com/images/misc/1234.png"/>
}
else if($route->flighttype == "C")
{
 <img src="http://www.1234.com/images/misc/5678.png"/>
}
else
{
 <img src="http://www.1234.com/images/misc/910.png"/>
}?>

I get the following message: Parse error: syntax error, unexpected '<' in /hp/bh/ad/yc/www/core/templates/schedule_results.tpl on line 121

Is the embedding of the image wrong?

Guest lorathon
Posted

Change it to this


<?php
if ($route->flighttype == "P")
{?>
 <img src="http://www.1234.com/images/misc/1234.png"/>
<?php
}
else if($route->flighttype == "C")
{?>
 <img src="http://www.1234.com/images/misc/5678.png"/>
<?php
}
else
{?>
 <img src="http://www.1234.com/images/misc/910.png"/>
<?php
}?>

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