Bueno93 Posted November 23, 2010 Report Share Posted November 23, 2010 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?! 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 Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted November 23, 2010 Report Share Posted November 23, 2010 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 } Quote Link to comment Share on other sites More sharing options...
Bueno93 Posted November 23, 2010 Author Report Share Posted November 23, 2010 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? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted November 23, 2010 Report Share Posted November 23, 2010 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 }?> Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted November 23, 2010 Report Share Posted November 23, 2010 You had HTML code inside of the php brackets. Quote Link to comment Share on other sites More sharing options...
Bueno93 Posted November 23, 2010 Author Report Share Posted November 23, 2010 Perfect!!! exactly what I intended. Thank you very much :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.