route map

I get this error when I try to view the route map:  Parse error: syntax error, unexpected T_ELSE in /home/a8930745/public_html/phpvms/core/modules/RouteMap/RouteMap.php on line 31

I checked and double checked, and that particular part of the code is exactly as Nabeel said to make it. Any help is appreciated.

Copy that part of the code and post it here, a fresh pair of eyes will help.

Cheers

Dan C

Here it is

$shownroutes = array();

$centerlat = 0;

$centerlong = 0;

Create map

foreach($allschedules as $schedule)

{

 

  $route = $schedule->depicao.$schedule->arricao;

 

  if(in_array($route, $shownroutes));

  {

    continue;

  }

                  else

  {

      $shownroutes = $route;

  }

if(in_array($route, $shownroutes));<- there shouldn’t be a ; there. That is what is causing your problem.

Cheers

Dan C

       

It also seems like you’re missing the closing bracket for the foreach()

Also, PLEASE indent!! After every { there should be an indent, you’ll spot errors real fast:

$shownroutes = array();
      
$centerlat = 0;
$centerlong = 0;
      
# Create map
foreach($allschedules as $schedule)
{
       
      $route = $schedule->depicao.$schedule->arricao;
       
      if(in_array($route, $shownroutes))
      {
              continue;
        }
      else
      {
              $shownroutes[] = $route;
      }
}

Thanks for the help. There are no more errors, but when I go to the page it loads but no map shows up. I have a google API key, and the live flight map works, just when I go to the routmap nothing loads on the page.

Check this thread

When I try to save the file I get this error: Warning: ftp_put() [function.ftp-put]: Can’t open that file: Permission denied in /home/manager/public_html/includes/filesystem.inc.php on line 1367  Status: This file could not be saved.

Set the permissions on the file you’re editing to something writable (775 or 777)

I got the file edited, but all that will show up is the title, still no map.

Can you paste the files?

The file for the page where I am calling for the route map, the actual route map file, or both?

both, just attach them

Here they are. Thanks for all of your help so far.

[routemap.htm](< base_url >/applications/core/interface/file/attachment.php?id=47)

[RouteMap.php.txt](< base_url >/applications/core/interface/file/attachment.php?id=48)

ok in routemap.htm, just do

<?php

MainController::Run('RouteMap', 'Controller');

?>

When I use that I get the following php error: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/a8930745/public_html/phpvms//core/templates/<html> <head> <meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /> <title>Route Map</title> </head> <body> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmh5p1i5yMwpb66nDaOw1eRQwTXokuW8BVf_s5QXPuQRNUwc0eRRF4KMwcmpt4u7wbdAJNLbxS-w5jA" type=“text/javascript” charset=“utf-8”></script><script type=“text/javascript” charset=“utf-8”> //<![CDATA[/************************************************* * Created with GoogleMapAPI 2.5 * Author: Monte Ohrt <monte AT ohrt DOT com> * Copyright 2005-2006 New Digital Group * http://www.phpinsider.com/php/code/GoogleMapAPI/ *************************************************/ var points = ; var markers = ; var counte in /home/a8930745/public_html/phpvms/core/classes/TemplateSet.class.php on line 95

Thanks.

Could anyone tell me what this error is saying/how to fix it? I have been trying to fix it/ trace the route of the problem for quite some time, but to no avail. Thanks.

Seems like you’re putting HTML in your title

Seems like you’re putting HTML in your title

Could you please explain what you mean/how to fix it. I think I understand what you are saying, but I want to be sure. I apologize for the extent of my questions, I am not very good at coding, as you can probably guess. Thanks for all of your help so far.

No problem. What are you entering for the page title?